var mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');

var NewsSchema = new mongoose.Schema({ //Schema:一种以文件形式存储的数据库模型骨架
    cateid:mongoose.Schema.ObjectId,
    title: String,
    content: String,
    date:{type:Date,default:Date.now},
    path:String
});
NewsSchema.plugin(mongoosePaginate);

module.exports = mongoose.model('new', NewsSchema);